Implementations of the claimed invention generally may relate to allocation of memory and, more particularly, to dynamic allocation of memory among processes.
In data processing, sometimes a memory is logically partitioned for use by a number of processes. If four processes are running, for example, the memory may be partitioned into four portions corresponding to each of the processes. If the processes are related (e.g., as parts of a pipeline process), such partitioning scheme may allocate each process some minimum amount of the memory to prevent deadlock. The remaining amount of the memory above this aggregate minimum amount may be allocated among the processes to facilitate greater performance by the processes.
When the number of processes using a memory changes, it may be desirable to change the allocation of the memory to optimize for the new number of processes (e.g., three or five, instead of the four processes in the above example). Some or all of the existing processes, however, may have associated data in the memory, and such data may fall into another process's portion of the memory or may be orphaned if its process is discontinued. Thus, the memory is typically flushed (e.g., emptied of data) before it may be re-partitioned among the new number of processes. In some cases, the in-process data may be immediately deleted/flushed from the memory and reloaded as appropriate under the new partitioning scheme. In other cases, the in-process data may be implicitly flushed from the memory by allowing the processes to completely process it before repartitioning the memory.
Regardless of the scheme used for flushing, however, flushing the memory may adversely affect performance of the processes. Flushing the memory before partitioning or allocation may delay the processing of data by the old processes, the new processes, or both.